<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<link rel="stylesheet" type="text/css" href="../../css/style.css"/>
		<link rel="stylesheet" type="text/css" href="../../css/demo.css"/>
		<script src="../../js/demo.js" type="text/javascript" charset="utf-8"></script>
		<title>设置新密码</title>
	</head>
	<body>
		<!--header-->
		<div class="header">
			<div class="header-content">
				<ul class="nav left">
					<li><img src="../../img/regist-arrow.png"/></li> 
					<li class="nav-one"><a href="register-newuser.html">返回</a></li>
					<li class="nav-two"><a href="login-home.html">关闭</a></li>
				</ul>
				<p class="left">找回密码</p>
				<div class="right nav_right">
					<img src="../../img/regist-list.png"/>
				</div>
			</div>
		</div>
		<!--main-->
		<div class="main clear">
			<form action="" >
				<div class="main-content2">
					<div class="password">
						<label for="password">
							<img src="../../img/register-mima.png"/>
						</label>
						<input type="password" id="password" value="" name="password" placeholder="设置6-20位密码，仅限字母和数字"/>
						<span id="span2" style="color: red;font-size: 20px;" hidden="hidden"></span>
					</div>			
				</div>
				
				<input type="button" name="" onclick="changePassword2()" id="" value="登录" class="login"/>
			</form>	
		</div>
		<script type="text/javascript" src="../../js/jquery-3.2.1.min.js"></script>
		<script type="text/javascript">
		//设置密码并登陆
			function changePassword2(){
				var password=$('#password').val();
				$.ajax({
					type:"post",
					url:"/qiaomengapp/user/changePassword2",
					data:"password="+password,
					success:function(data){				
						$('#span2').html(data);					
						if(data==""){
							 window.location.href ='/qiaomengapp/index.html';
						}
					}
				});
			}	
		
		</script>
	</body>
</html>
